//
//  LeftCell.swift
//  ShiZhe
//
//  Created by 陈卿伟 on 16/9/7.
//  Copyright © 2016年 陈卿伟. All rights reserved.
//

import UIKit

class LeftCell: UITableViewCell {
    var cellLabel:UILabel!

    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        cellLabel = UILabel()
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.backgroundColor = UIColor.clearColor()
        self.changedCellSelecteColor()
        self.createLabel()
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    //点击之后的颜色变为背景颜色
    func changedCellSelecteColor(){
        let view = UIView(frame: CGRect(x: 0,y: 0,width: 88*SCALEW,height: 60*SCALEH))
        view.backgroundColor = Theme.BGColor
        self.selectedBackgroundView = view
    }
    
    //创建cell中间的label
    func createLabel(){
        cellLabel.frame = CGRect(x: 10,y: 0,width: 68*SCALEW,height: 60*SCALEH)
        cellLabel.textColor = BaseFunc.createCustomColor(88, b: 88, g: 88, a: 1)
        cellLabel.textAlignment = .Center
        cellLabel.numberOfLines = 0
        cellLabel.font = BaseFunc.getCustomFont(15)
        self.addSubview(cellLabel)
    }

}
